{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "659202ea-21b1-4249-8fbd-3fc5705ed2a0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.30000000000000004\n"
     ]
    }
   ],
   "source": [
    "a = 0.1 + 0.2 \n",
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d7740938-d2d2-407b-9169-ce2b6f95575b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2189438271824\n",
      "2189434672272\n"
     ]
    }
   ],
   "source": [
    "b = 0.1 \n",
    "c = 0.1 \n",
    "\n",
    "print(id(b)) \n",
    "print(id(c))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "fadeacad-a920-4ab6-9a11-5dbbe4f00305",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "float"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a27034a5-2065-4162-bed1-dc8c231e9ff9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n"
     ]
    }
   ],
   "source": [
    "print(isinstance(c, int))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "458cdcd6-b2c9-4150-8432-fa519e538d87",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入一个数字或字符:  3\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'str'>\n",
      "13\n"
     ]
    }
   ],
   "source": [
    "num = input(\"请输入一个数字或字符: \")\n",
    "print(type(num))\n",
    "num = int(num) + 10\n",
    "print(num)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "65521608-ebda-411c-bf01-237daa3ed4a3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100010\n"
     ]
    }
   ],
   "source": [
    "num2 = 1000_10\n",
    "print(num2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "72e25b74-2d21-4a6b-8530-1c70903465c9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "int"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(num2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "bcac1bab-789d-4220-b7fe-84b4276c88a2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm ok \n"
     ]
    }
   ],
   "source": [
    "print('I\\'m ok ')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "86568f68-3de6-4da0-b682-57cbc1f58a29",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm ok \\\n"
     ]
    }
   ],
   "source": [
    "print('I\\'m ok \\\\')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b6ed3482-12be-4c01-af3b-501683bbd4da",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'm ok \\\n"
     ]
    }
   ],
   "source": [
    "print(\"I\\'m ok \\\\\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "091b334c-6b72-4ba5-89bf-1a0a52e02a45",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\\\\\\t \\\\\n"
     ]
    }
   ],
   "source": [
    "print(r'\\\\\\t \\\\')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "d25a712f-437e-49a9-bfe6-3418152ad478",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "3> 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "354f4e75-3ceb-47d3-a0ff-a908dddb5216",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "True and False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "ca6c55c5-1c18-4f8c-b156-f2ada19dfc0e",
   "metadata": {},
   "outputs": [],
   "source": [
    "None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "415888a8-7917-487a-9346-2b615014abf5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "print(None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "3d376e56-9a64-4764-a375-c01cffd4af39",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "cannot assign to None (731394985.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  Cell \u001b[1;32mIn[26], line 1\u001b[1;36m\u001b[0m\n\u001b[1;33m    None = 0\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m cannot assign to None\n"
     ]
    }
   ],
   "source": [
    "None = 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "36977748-5d52-4683-82e5-a6d9e55dfb70",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "None == 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "785b1a09-353e-4285-94ac-9b387204f697",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.0"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "9 / 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "01b5ea91-5103-42fb-a7ea-655c449eefe8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
